<template>
  <div class="home">
    <div>
      <ul>
        <li>
           {{date.groupname}}
        </li>
        <li>
           {{date.truename}}
        </li>
      </ul>
    </div>
    <div class="log" @click="quin">退出登录</div>
  </div>
</template>

<script>
import {qui} from '@/api/api'


export default {
  name: 'Home',
  data () {
    return {
       date:''
    }
  },
  created(){
     this.date=this.$store.state.date
  },
  methods:{
    quin(){
      console.log(this.$store.state.date)
      
      qui({
        uid:this.$store.state.uid
      }).then(res=>{
        console.log(res)
        if(res.data.code==0){
           this.$router.push('/') 
           
        }
      })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>


</style>
